#ifndef unigame_Device_h
#define unigame_Device_h

#include "config/Def.h"
#include "transform/Vector2.h"

namespace unigame
{
	enum DeviceParamID
	{
		E_WND_INSTANCE,
		E_HDC,
	};

	class Input;
    class Device
    {
    public:
        virtual ~Device();
        
        char* getResourcePath()
        {
            return m_resourcePath;
        }
        
        int32u getResourcePathLength()
        {
            return m_resourcePathLength;
        }

		char* getSavePath()
		{
			return m_savePath;
		}

		int32u getSavePathLength()
		{
			return m_savePathLength;
		}
        
        static Device* currentDevice();
        
        static void destroy()
        {
            if(s_device)
            {
				uni_delete(s_device);
            }
        }

		Vector2f& screenSize()
		{
			return m_screenSize;
		}

		bool isFullScreen()
		{
			return m_isFullScreen;
		}

		virtual void isFullScreen(bool isFull) = 0;

		virtual void setParam(int paramID, void* param){}

		virtual void* getParam(int paramID)
		{
			return 0;
		};

		virtual void startDisplay() = 0;

		virtual void resizeScreen(float w, float h);
        
    protected:
        Device():m_isFullScreen(false){}
        
    protected:
        static Device* s_device;
        char* m_resourcePath;
        int32u m_resourcePathLength;
		char* m_savePath;
		int32u m_savePathLength;
		Vector2f m_screenSize;
		bool m_isFullScreen;
    };
}

#endif
